import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/results'
  },
  {
    //动态路由动态传递参数,用：来进行区分
    path: '/results/:keyword?',
    name: 'results',
    component: () => import(/* webpackChunkName: "results" */ '../views/Results.vue')
  },
  {
    //加上调用保持一致
    path: '/player/:id?',
    name: 'player',
    component: () => import(/* webpackChunkName: "player" */ '../views/Player.vue')
  },
  {
    path: '/video/:mvid?',
    name: 'video',
    component: () => import(/* webpackChunkName: "video" */ '../views/Video.vue')
  },
  {
    path: '/comment/:id?',
    name: 'comment',
    component: () => import(/* webpackChunkName: "comment" */ '../views/Comment.vue')
  }
  // 剩下的业务页面逻辑请大家自行完成
]

const router = new VueRouter({
  routes
})

export default router
